<!DOCTYPE html>
<html>
<head>
    {include file="../application/common/header.html" /}
</head>

<body>
    <table id="soft_regpg" class="easyui-propertygrid" 
        data-options="url: '{:url(\'soft_reg/query\')}', 
        showHeader:true,
        fitColumns:true,
        nowrap:false,
        scrollbarSize:0,
        border:false,
        columns:[[
            {field:'name',title:'项目名称',width:80},
            {field:'value',title:'当前值',width:500}
        ]], 
        onAfterEdit: onAfterEdit">
    </table>
    <script type="text/javascript">
        function onAfterEdit(rowIndex,rowData,changes){
            if(changes.hasOwnProperty("value")){
                _name=rowData.name;
                _value=changes.value;
                var url='<%=cf%>.asp?ac=pgModify';
                $.ajax({
                    type: "POST",
                    url: "{:url('soft_reg/addUpdate')}",
                    data: {
                        name:_name,
                        value:_value
                    },
                    success: function(r){
                        $('#soft_regpg').propertygrid('reload')
                    }
                });
            }
        }
    </script>

</body>
</html>